<?
// Page variables
$rightCol   = 1;
include("includes/functions.php"); 
include("includes/header.php"); ?>
	<div id="pageTop"></div>
	<div id="pageContent">
		<? include("includes/menu_main.php"); ?>
		
		<div id="rightCol">
			<img src="images/rightColTop.gif">
			<? include("includes/rightCol.php");  ?>
		</div>
		<div id="mainContent">
		<h1>Conferences and Events</h1>		<?		$events = 0;		// Render all active events		$sql = "SELECT * from transCategories WHERE CatType = 'C' ORDER BY CatName";		$result = mysql_db_query($dbname,$sql);				while ($value = mysql_fetch_assoc($result)) {			$catID   = $value[CID];			$catName = stripslashes($value[CatName]);								$sql2 = "SELECT * from transEvents 					WHERE 						ECat = '$catID' AND						(
							DateEnd >= '".date('Y-m-d')."' OR
							DateStart >= '".date('Y-m-d')."'
						) AND						Active = 1 					ORDER BY DateStart DESC"; 
			$result2 = mysql_db_query($dbname,$sql2);			$rows2 = mysql_num_rows($result2);						if ($rows2>0) { $eventString .= '<h2 style="margin-top: 10px;">'.$catName.'</h2>'; }						$i=1;						$eventString .= '<ul class="ulMain">';			while ($value2 = mysql_fetch_assoc($result2)) {				if (($i % 2) > 0) { $class = 'ulHome'; }				else { $class = "ulHome altRow"; }				$eID       = $value2[EID];				$eTitle    = stripslashes($value2[EventTitle]);				$eDesc     = stripslashes($value2[EventDesc]);				$eURL      = $value2[EventURL];				$eLocation = $value2[EventLocation];				$dateTimeStart = convertDateTime($value2[DateStart]);				$dateTimeEnd   = convertDateTime($value2[DateEnd]);				$eTimes    = $value2[EventTimes];				$active    = $value2[Active];								$dateStart = $dateTimeStart[0];				$dateEnd   = $dateTimeEnd[0];								$eventString .= '<li class="'.$class.'">';				if ($eReg == 1) {					if ( !empty($eRegURL) && ($eRegURL != 'http://') ) {						$regURL = $eRegURL;					} else {						$regURL = 'register.php?eID='.$eID;					}					$eventString .= '<a href="'.$regURL.'" title="Register for this event"><img src="images/buttonRegister.gif" style="border: none;" alt="Register for this event" /></a>';				}				$eventString .= '<p><b>'.$eTitle.'</b><br />';				$eventString .= '<span class="date">'.$dateStart;				if (!empty($dateEnd)) {					$eventString .= ' to '.$dateEnd;				}				$eventString .= '</span></p>';				$eventString .= '<p>'.$eDesc.'</p>';					if (!empty($eLocation)) {					$eventString .= '<p class="sectionLocation">'.$eLocation.'</p>';				}				if (!empty($eURL)) {					$eventString .= '<p class="sectionWebsite"><a href="'.$eURL.'" target="_blank">Event website</a></p>';				}					$eventString .= '</li>';				$i++;				$events++;			}						$eventString .= '</ul>';		}		if ($events == 0) { 			$eventString .= 'There are no events at this time. Please check back again soon.'; 		}							echo $eventString;		?>			
		<div class="spacer2" style="height: 800px;"></div>
		</div>
		
	</div>
<? include("includes/footer.php"); ?>